package com.example.Hongbao;

import android.content.Context;
import android.content.Intent;

/**
 * Created by Fcy on 2015/12/21.
 */
public class FloatWindowServiceManager {
	private Intent service;
	private static Context mContext;

	private static FloatWindowServiceManager mInstance = null;

	public static FloatWindowServiceManager getInstance(Context context) {
		mContext = context;
		return mInstance = new FloatWindowServiceManager();
	}

	private FloatWindowServiceManager() {
		if (service == null)
			service = new Intent(mContext, FloatWindowService.class);
	}

	public void showWindow() {
		mContext.startService(service);
	}

	public void closeWindow() {
		mContext.stopService(service);
	}

	public void stopService() {
		mContext.stopService(service);
	}
}
